package com.jinlia.show.modules.system.controller;

import com.jinlia.show.modules.base.wxapp.entity.SwiperImgs;
import com.jinlia.show.modules.base.wxapp.service.SwiperImgsMapperService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("/swiperImgs")
public class SwiperImgsController {

    @Autowired
    private SwiperImgsMapperService swiperImgsMapperService;


    @PostMapping("/list")
    public List<SwiperImgs> getPageVO(@RequestBody SwiperImgs swiperImgs){
        List<SwiperImgs> list = swiperImgsMapperService.list();
        return list;
    }

    @PostMapping("/add")
    public SwiperImgs add(@RequestBody SwiperImgs swiperImgs){
        boolean save = swiperImgsMapperService.save(swiperImgs);
        return swiperImgs;
    }
}
